package org.dromara.business.domain.bo;

import org.dromara.business.domain.WalletChange;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;

/**
 * 钱包变动记录业务对象 wallet_change
 *
 * @author zlj
 * @date 2024-08-20
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = WalletChange.class, reverseConvertGenerate = false)
public class WalletChangeBo extends BaseEntity {

    /**
     * 钱包余额变化表
     */
    @NotNull(message = "钱包余额变化表不能为空", groups = { EditGroup.class })
    private Long walletChangeId;

    /**
     * 用户id
     */
    @NotNull(message = "用户id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 变化类型（0.增加 1.减少）
     */
    @NotNull(message = "变化类型（0.增加 1.减少）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer changeType;

    /**
     * 变化值
     */
    @NotNull(message = "变化值不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal changeCount;

    /**
     * 变化前的值
     */
    @NotNull(message = "变化前的值不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal changeBefore;

    /**
     * 变化后的值
     */
    @NotNull(message = "变化后的值不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal changeAfter;


}
